var exec = require('cordova/exec');

module.exports = {
    initSilkwarehouse: function (qrcode, vendor, specification, weight, success, error) {
        exec(success, error, "Printer", "initSilkwarehouse", [qrcode, vendor, specification, weight]);
    },
    wirerodpurchaseinorder: function (qrcode, vendor, specification, weight, name,  success, error) {
        exec(success, error, "Printer", "wirerodpurchaseinorder", [qrcode, vendor, specification, weight, name]);
    },
    accessorypurchaseinorder: function (code, name, specification, weight, batch, success, error) {
        exec(success, error, "Printer", "accessorypurchaseinorder", [code, name, specification, weight, batch]);
    },
    comeprocessinorder: function (qrcode, vendor, specification, weight, customer, processType, success, error) {
        exec(success, error, "Printer", "comeprocessinorder", [qrcode, vendor, specification, weight, customer, processType]);
    },
    returnorder: function (qrcode, vendor, specification, weight,workplanNumber, success, error) {
        exec(success, error, "Printer", "returnorder", [qrcode, vendor, specification, weight,workplanNumber]);
    },
    initProductwarehouses: function (number, specification, weight,workplanNumber, success, error) {
        exec(success, error, "Printer", "initProductwarehouses", [number, specification, weight,workplanNumber]);
    },
    wirerodcollectoutorder: function (number, specification, amount, machine, success, error) {
        exec(success, error, "Printer", "wirerodcollectoutorder", [number, specification, amount, machine]);
    },
    initRopeWirewarehouse: function (number, dcbz, pm, gg, qd, mc, mz, pz, jz, czg, rq, kh, xd, gh, pcd, axleLength, success, error) {
        exec(success, error, "Printer", "initRopeWirewarehouse", [number, dcbz, pm, gg, qd, mc, mz, pz, jz, czg, rq, kh, xd, gh, pcd, axleLength]);
    },
    initTwistWirewarehouse: function (number, mc, name, specification, jg, zj, nx, bm, qd, ty, date, user, length, sgg, pcd, isShort, success, error) {
        exec(success, error, "Printer", "initTwistWirewarehouse", [number, mc, name, specification, jg, zj, nx, bm, qd, ty, date, user, length, sgg, pcd, isShort]);
    },
    initUniteWirewarehouse: function (number, mc, name, specification, jg, zj, nx, bm, qd, ty, date, user, pcd, sjmc, isShort, ddxx, success, error) {
        exec(success, error, "Printer", "initUniteWirewarehouse", [number, mc, name, specification, jg, zj, nx, bm, qd, ty, date, user, pcd, sjmc, isShort, ddxx]);
    },
    initHDFCwarehouse: function (number, mc, name, specification, jg, zj, nx, bm, qd, ty, date, user, machine, mz, pz, jz, ddxx, success, error) {
        exec(success, error, "Printer", "initHDFCwarehouse", [number, mc, name, specification, jg, zj, nx, bm, qd, ty, date, user, machine, mz, pz, jz, ddxx]);
    },
    //酸洗收线
    acidTakeup: function (qrcode, steel, specification, weight, success, error) {
        exec(success, error, "Printer", "acidTakeup", [qrcode, steel, specification, weight]);
    },
    //拉丝收线 编号（二维码内容）、物料名称、规格、钢号、长度、净重、客户、排产单号、入库员
    silkTakeup: function (qrcode, name, specification, steel, length, weight, kh, pcd, user, success, error) {
        exec(success, error, "Printer", "silkTakeup", [qrcode, name, specification, steel, length, weight, kh, pcd, user]);
    },
    //钢绞线捻股收线 编号（二维码内容）、物料名称、规格、钢号、长度、净重、客户、排产单号、入库员
    gjxtwistwireTakeup: function (qrcode, name, specification, steel, length, weight, kh, pcd, user, success, error) {
        exec(success, error, "Printer", "gjxtwistwireTakeup", [qrcode, name, specification, steel, length, weight, kh, pcd, user]);
    },
    //热处理收线 编号（二维码内容）、物料名称、规格、钢号、净重、客户、排产单号
    heatTakeup: function (qrcode, name, specification, steel, weight, kh, pcd, qd, zinc, success, error) {
        exec(success, error, "Printer", "heatTakeup", [qrcode, name, specification, steel, weight, kh, pcd, qd, zinc]);
    },
    //直径取样 编号（二维码内容）、物料名称、规格、钢号、净重、客户、排产单号、抗拉强度、上锌量
    qualitysampling: function (qrcode, name, specification, steel, weight, kh, pcd, qd, zinc, success, error) {
        exec(success, error, "Printer", "qualitysampling", [qrcode, name, specification, steel, weight, kh, pcd, qd, zinc]);
    },
    //一二期成品标签 编号（二维码内容）、物料名称、规格、钢号、净重、锌层、日期
    wireProduct: function (qrcode, name, specification, steel, weight, zinc, time, qd, zincBZ, success, error) {
        exec(success, error, "Printer", "wireProduct", [qrcode, name, specification, steel, weight, zinc, time, qd, zincBZ]);
    },
    //三期成品标签 编号（二维码内容）、物料名称、规格、钢号、净重、日期、强度
    steelStrandProduct: function (qrcode, name, specification, steel, weight, time, qd, success, error) {
        exec(success, error, "Printer", "steelStrandProduct", [qrcode, name, specification, steel, weight, time, qd]);
    },
    //钢丝 退货
    wireProductback: function (qrcode, name, specification, weight, success, error) {
        exec(success, error, "Printer", "wireProductback", [qrcode, name, specification, weight]);
    },
}